#ifndef __CONDITION_H__
#define __CONDITION_H__

#include <pthread.h>
#include <boost/utility.hpp>
#include "mutex_lock.h"

namespace mars {

class Condition : boost::noncopyable {
    public:
        Condition();
        ~Condition();
        void wait(MutexLock& mutex);
        void notify();
        void notifyAll();
    private:
        pthread_cond_t _cond;
};

} // namespace mars

#endif //__CONDITION_H__

